package com.jpm.jroguefx.utilities;

import java.util.logging.Level;
import java.util.logging.Logger;

public class PerfLogger {

    private final long time = System.currentTimeMillis();
    private final String component;
    private final Object obj;

    public PerfLogger(Object obj, String component) {
        this.component = component;
        this.obj = obj;
    }

    public void report() {
        Logger.getLogger(obj.getClass().getName()).log(Level.INFO, "{0} completed in {1}millis", new Object[]{component, System.currentTimeMillis() - time});
    }
}